class Restaurant:
    def __init__(self,name,cuisine):
        self.name=name
        self.cuisine=cuisine
        self.number_served=100
    # 开馆营业
    def open_restaurant(self):
        print(f'{self.name}要开馆营业啦，欢迎光临！')
    # 更新设置就餐人数
    def print_num_served(self,num):
        if num >= self.number_served:
            self.number_served=num
        else:
            print('就餐人数只能变多不能减少哦')
    # 增加就餐人数

    def increment_served(self,add_num):
        self.number_served+=add_num
# 餐馆介绍
    def describe(self):
        print(f'餐馆的名字是{self.name},餐馆的菜式是{self.cuisine},就餐人数有{self.number_served}')

# 创建新的子类-冰淇淋店
class  IceCreamStand(Restaurant):
    def __init__(self,name,cuisine):
        super().__init__(name,cuisine)
        self.flavor_list=[]
        # 更新口味列表
    # def print_icecream_flavor(self,flavor):
    #     flavor_list=['波波茶']
    #     flavor_list.append(flavor)
    #     print(f'冰淇淋店铺内的口味有{flavor_list}')
    # 增加新的口味
    def add_icecream_flavor(self,flavorlist):
        self.flavor_list.append(flavorlist)
    # 描述全部的口味
    def print_icecream_flavor(self):
        print(f'冰淇淋店铺内的口味有{self.flavor_list}')


mixuebingcheng=IceCreamStand('蜜雪冰城','茶饮')
mixuebingcheng.describe()
mixuebingcheng.add_icecream_flavor('波波茶')
mixuebingcheng.print_icecream_flavor()

mixuebingcheng.add_icecream_flavor('乌龙茶')
mixuebingcheng.print_icecream_flavor()

mixuebingcheng.add_icecream_flavor('牛乳茶')
mixuebingcheng.print_icecream_flavor()